package org.wdj.anno;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import org.wdj.validation.StateValidation;

import java.lang.annotation.*;
@Documented//注解的描述信息
@Constraint(
        validatedBy = { StateValidation.class }
)
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface State {
    //错误信息
    String message() default "参数值只能是草稿或已发布";
    //分组
    Class<?>[] groups() default {};
    //负载
    Class<? extends Payload>[] payload() default {};
}
